﻿<%@ Page Language="C#" MasterPageFile="~/masterpages/desktop/desktop.Master" AutoEventWireup="true" CodeBehind="DepartmentInfo.aspx.cs" Inherits="permit.DepartmentInfo" Title="无标题页" %>
<%--<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TopImage" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="TopText" runat="server">
</asp:Content>--%>
<asp:Content ID="Content4" ContentPlaceHolderID="cpMainContent" runat="server">


<br />
<br />
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:10px">
      <tr>
        <td><img src="../department/Images/Index_dep.jpg" width="750" height="48" /></td>
      </tr>
      <tr>
        <td valign="top" background="Images/Index_3.jpg" align="center">       
          <div style="width:730px;background-color:#FFFFFF;padding:10px 0px 20px 0px; font-size:14px;">         
             <div>
       
             <table width="720" cellpadding="5" cellspacing="0" border="1" style="border-collapse:collapse;border-color:#CCC">
 	<tr>
 	  <td width="120" height="25" bgcolor="#F7F7F7" 
            style="text-align:center;font-weight:bold;">区县单位名称：</td>
 	  <td>
                    <asp:TextBox ID="txtDepName" runat="server" style="margin-left: 0px" 
                        Width="170px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtDepName" ErrorMessage="*"></asp:RequiredFieldValidator>
                </td>
 	  <td width="120" height="25" bgcolor="#F7F7F7" 
            style="text-align:center;font-weight:bold;">区县单位描述：</td>
 	 <td align="left">
                    <asp:TextBox ID="txtDepDescr" runat="server" Width="200px" 
             TextMode="MultiLine" Height="36px" CssClass="style1"></asp:TextBox>
                </td>
    </tr>
 	<tr>
 	  <td width="120" height="25" bgcolor="#F7F7F7" 
            style="text-align:center;font-weight:bold;">单位发证权限：</td>
 	  <td align="left">
                    <asp:RadioButtonList ID="rblDepPrint" runat="server" RepeatColumns="2" 
                        RepeatDirection="Horizontal">
                        <asp:ListItem Selected="True" Value="0">是</asp:ListItem>
                        <asp:ListItem Value="1">否</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
 	  <td width="120" height="25" bgcolor="#F7F7F7" 
            style="text-align:center;font-weight:bold;">行 政 编 号：</td>
 	 <td align="left" style="color: #FF0000">
                    <asp:TextBox ID="txtAreaCode" runat="server" MaxLength="6" Width="80px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="txtAreaCode" ErrorMessage="*"></asp:RequiredFieldValidator>
                    6位行政区域代码</td>
    </tr>
    <tr>
 	  <td  colspan="4" height="25"  style="text-align:center;font-weight:bold">
                    <asp:Button ID="btnAdd" runat="server" onclick="btnAdd_Click" 
              Text="添  加" Height="26px" Width="60px" />
 	  <input type="hidden" name="JHDH" id="JHDH" />
 	    &nbsp;
 	    <span id="ErrMsg">
                    <asp:Button ID="btnEdit" runat="server" onclick="btnEdit_Click" Text="修  改" 
                        Visible="False" Width="60px" />
                &nbsp;
                    <asp:Button ID="btnDelet" runat="server" onclick="btnDelet_Click" 
              Text="删  除" Width="60px" />
                </span>
 	  </td>
 	  
    </tr>
    </table>
    
        <asp:GridView ID="gridDeparment" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="dep_ID" DataSourceID="DepartmentDataSource" Width="720px" 
            AllowPaging="True" CellPadding="4" ForeColor="#333333" 
                     onrowdatabound="gridDeparment_RowDataBound">
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <RowStyle HorizontalAlign="Center" BackColor="#EFF3FB" />
            <Columns>
                <asp:BoundField DataField="dep_AreaCode" HeaderText="行政编号" InsertVisible="False" 
                    ReadOnly="True" SortExpression="dep_ID" />
                <asp:HyperLinkField DataNavigateUrlFields="dep_ID" 
                    DataNavigateUrlFormatString="DepartmentInfo.aspx?Sturt=Edit&amp;id={0}" 
                    DataTextField="dep_Name" HeaderText="单位名称" />
                <asp:BoundField DataField="dep_Description" HeaderText="描述" 
                    SortExpression="dep_Description" />
                <asp:BoundField DataField="dep_Print" HeaderText="打印权限" 
                    SortExpression="dep_Print" />
            </Columns>
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" 
                HorizontalAlign="Center" />
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
                 <input id="hdDepName" type="hidden" runat="server"/>
        <asp:SqlDataSource ID="DepartmentDataSource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:permitConnectionString %>" 
            
                     
                     SelectCommand="SELECT [dep_ID], [dep_Name], [dep_Description], [dep_Print], [dep_AreaCode] FROM [DepartmentTable]">
        </asp:SqlDataSource>
                 <input id="hdAreaCode" type="hidden" runat="server"/>
          </td>
          </tr>
      <tr>
        <td valign="top" background="Images/Index_3.jpg" align="center">       
            &nbsp;</td>
          </tr>
          <tr>
            <td height="48px" valign="top" background="Images/Index_3.jpg" align="center"></td>
          </tr>
</table>
             
            </div>
         </div>
          </td>
          </tr>
          <tr>
            <td height="48px" valign="top" background="Images/Index_3.jpg" align="center"></td>
          </tr>
</table>
    
        </asp:Content>
<asp:Content ID="Content5" runat="server" contentplaceholderid="head">

    <style type="text/css">
        .style1
        {
            margin-left: 0px;
        }
    </style>

</asp:Content>

